package com.xli.dto.validation;

import cn.hutool.core.util.StrUtil;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;

public class NotNullOrBlankValidator implements ConstraintValidator<NotNullOrBlank, String> {

    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        return !StrUtil.isBlankIfStr(value);
    }
}
